@extends("layouts_admin.index")
@section("content")
    <section class="content">


        <div class="box box-info">
            <div class="box-header with-border">
                <h3 class="box-title">添加文章</h3>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <form class="form-horizontal">
                <div class="box-body">
                    <div class="form-group col-sm-12">
                        <label for="inputEmail3" class="col-sm-2 control-label">标题:</label>
                        <div class="col-sm-6">
                            <input type="email" class="form-control" id="inputEmail3" placeholder="标题">
                        </div>
                    </div>
                    <div class="form-group col-sm-12">
                        <label for="inputEmail3" class="col-sm-2 control-label">作者:</label>
                        <div class="col-sm-6">
                            <input type="email" class="form-control" id="inputEmail3" placeholder="作者">
                        </div>
                    </div>
                    <div class="form-group col-sm-12">
                        <label for="inputEmail3" class="col-sm-2 control-label">分类:</label>
                        <div class="col-sm-6">
                            <select class="form-control select2 select2-hidden-accessible" style="width: 100%;" tabindex="-1" aria-hidden="true">
                                <option selected="selected">Alabama</option>
                                <option>Alaska</option>
                                <option disabled="disabled">California (disabled)</option>
                                <option>Delaware</option>
                                <option>Tennessee</option>
                                <option>Texas</option>
                                <option>Washington</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-sm-12">
                        <label for="inputEmail3" class="col-sm-2 control-label">封面:</label>

                        <div class="col-sm-4">
                            <div style="width: 100px;height: 100px;border: 1px solid #ddd">

                            </div>
                        </div>
                    </div>
                    <div class="form-group col-sm-12">
                        <label for="inputEmail3" class="col-sm-2 control-label"></label>
                        <div class="col-sm-1">
                            <input type="file" name="file" style="display: none" id="fileUpload">
                            <input type="submit" name="submit" value="上传" id="btnFileUpload" class="btn btn-primary">
                        </div>
                    </div>
                    <div class="form-group col-sm-12">
                        <label for="inputEmail3" class="col-sm-2 control-label">状态:</label>
                        <div class="col-sm-6">
                            <input type="checkbox" name="my-checkbox" checked id="articleStatus">
                        </div>
                    </div>
                    <div class="form-group col-sm-12">
                        <label for="inputEmail3" class="col-sm-2 control-label">是否推荐:</label>
                        <div class="col-sm-6">
                            <input type="checkbox" name="my-checkbox" checked id="articleRecom">
                        </div>
                    </div>

                </div>
                <div class="box-body pad">
                    <form>
                    <textarea id="editor1" name="editor1" rows="10" cols="80" style="visibility: hidden; display: none;">
                    </textarea>
                    </form>
                </div>
                <!-- /.box-body -->
                <div class="box-footer">
                    <button type="submit" class="btn btn-info pull-left">提交</button>
                </div>
                <!-- /.box-footer -->
            </form>

        </div>

    </section>

@endsection
@section("js")

    <script type="text/javascript">
        $("#btnFileUpload").click(function () {
            $("#fileUpload").click();
        });
        $("#articleStatus").bootstrapSwitch(
                {
                    onText:"启用",
                    offText:"禁用"
                }
        );
        $("#articleRecom").bootstrapSwitch(
                {
                    onText:"是",
                    offText:"否"
                }
        );

        $(function () {

            CKEDITOR.replace('editor1');

        });

    </script>
@endsection